{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "# SVM - 租房意向预测"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# 导入必要模块\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "\n",
    "from sklearn.model_selection import GridSearchCV\n",
    "\n",
    "# SVM 并不能直接输出各类的概率, 所以我们用正确率作为模型预测性能的度量\n",
    "from sklearn.metrics import accuracy_score\n",
    "\n",
    "from matplotlib import pyplot\n",
    "import seaborn as sns\n",
    "\n",
    "%matplotlib inline\n",
    "pd.set_option('display.float_format', lambda x: '%.3f' % x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# 读取数据\n",
    "train = pd.read_csv('RentListingInquries_FE_train.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>bathrooms</th>\n",
       "      <th>bedrooms</th>\n",
       "      <th>latitude</th>\n",
       "      <th>longitude</th>\n",
       "      <th>price</th>\n",
       "      <th>price_bathrooms</th>\n",
       "      <th>price_bedrooms</th>\n",
       "      <th>room_diff</th>\n",
       "      <th>room_num</th>\n",
       "      <th>Year</th>\n",
       "      <th>...</th>\n",
       "      <th>walk</th>\n",
       "      <th>walls</th>\n",
       "      <th>war</th>\n",
       "      <th>washer</th>\n",
       "      <th>water</th>\n",
       "      <th>wheelchair</th>\n",
       "      <th>wifi</th>\n",
       "      <th>windows</th>\n",
       "      <th>work</th>\n",
       "      <th>interest_level</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1.500</td>\n",
       "      <td>3</td>\n",
       "      <td>40.715</td>\n",
       "      <td>-73.942</td>\n",
       "      <td>3000</td>\n",
       "      <td>1200.000</td>\n",
       "      <td>750.000</td>\n",
       "      <td>-1.500</td>\n",
       "      <td>4.500</td>\n",
       "      <td>2016</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.000</td>\n",
       "      <td>2</td>\n",
       "      <td>40.795</td>\n",
       "      <td>-73.967</td>\n",
       "      <td>5465</td>\n",
       "      <td>2732.500</td>\n",
       "      <td>1821.667</td>\n",
       "      <td>-1.000</td>\n",
       "      <td>3.000</td>\n",
       "      <td>2016</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1.000</td>\n",
       "      <td>1</td>\n",
       "      <td>40.739</td>\n",
       "      <td>-74.002</td>\n",
       "      <td>2850</td>\n",
       "      <td>1425.000</td>\n",
       "      <td>1425.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>2.000</td>\n",
       "      <td>2016</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1.000</td>\n",
       "      <td>1</td>\n",
       "      <td>40.754</td>\n",
       "      <td>-73.968</td>\n",
       "      <td>3275</td>\n",
       "      <td>1637.500</td>\n",
       "      <td>1637.500</td>\n",
       "      <td>0.000</td>\n",
       "      <td>2.000</td>\n",
       "      <td>2016</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1.000</td>\n",
       "      <td>4</td>\n",
       "      <td>40.824</td>\n",
       "      <td>-73.949</td>\n",
       "      <td>3350</td>\n",
       "      <td>1675.000</td>\n",
       "      <td>670.000</td>\n",
       "      <td>-3.000</td>\n",
       "      <td>5.000</td>\n",
       "      <td>2016</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 225 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   bathrooms  bedrooms  latitude  longitude  price  price_bathrooms  \\\n",
       "0      1.500         3    40.715    -73.942   3000         1200.000   \n",
       "1      1.000         2    40.795    -73.967   5465         2732.500   \n",
       "2      1.000         1    40.739    -74.002   2850         1425.000   \n",
       "3      1.000         1    40.754    -73.968   3275         1637.500   \n",
       "4      1.000         4    40.824    -73.949   3350         1675.000   \n",
       "\n",
       "   price_bedrooms  room_diff  room_num  Year       ...        walk  walls  \\\n",
       "0         750.000     -1.500     4.500  2016       ...           0      0   \n",
       "1        1821.667     -1.000     3.000  2016       ...           0      0   \n",
       "2        1425.000      0.000     2.000  2016       ...           0      0   \n",
       "3        1637.500      0.000     2.000  2016       ...           0      0   \n",
       "4         670.000     -3.000     5.000  2016       ...           0      0   \n",
       "\n",
       "   war  washer  water  wheelchair  wifi  windows  work  interest_level  \n",
       "0    0       0      0           0     0        0     0               1  \n",
       "1    0       0      0           0     0        0     0               2  \n",
       "2    0       0      0           0     0        0     0               0  \n",
       "3    0       0      0           0     0        0     0               2  \n",
       "4    1       0      0           0     0        0     0               2  \n",
       "\n",
       "[5 rows x 225 columns]"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "train.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 49352 entries, 0 to 49351\n",
      "Columns: 225 entries, bathrooms to interest_level\n",
      "dtypes: float64(7), int64(218)\n",
      "memory usage: 84.7 MB\n"
     ]
    }
   ],
   "source": [
    "train.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>bathrooms</th>\n",
       "      <th>bedrooms</th>\n",
       "      <th>latitude</th>\n",
       "      <th>longitude</th>\n",
       "      <th>price</th>\n",
       "      <th>price_bathrooms</th>\n",
       "      <th>price_bedrooms</th>\n",
       "      <th>room_diff</th>\n",
       "      <th>room_num</th>\n",
       "      <th>Year</th>\n",
       "      <th>...</th>\n",
       "      <th>walk</th>\n",
       "      <th>walls</th>\n",
       "      <th>war</th>\n",
       "      <th>washer</th>\n",
       "      <th>water</th>\n",
       "      <th>wheelchair</th>\n",
       "      <th>wifi</th>\n",
       "      <th>windows</th>\n",
       "      <th>work</th>\n",
       "      <th>interest_level</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>49352.000</td>\n",
       "      <td>49352.000</td>\n",
       "      <td>49352.000</td>\n",
       "      <td>49352.000</td>\n",
       "      <td>49352.000</td>\n",
       "      <td>49352.000</td>\n",
       "      <td>49352.000</td>\n",
       "      <td>49352.000</td>\n",
       "      <td>49352.000</td>\n",
       "      <td>49352.000</td>\n",
       "      <td>...</td>\n",
       "      <td>49352.000</td>\n",
       "      <td>49352.000</td>\n",
       "      <td>49352.000</td>\n",
       "      <td>49352.000</td>\n",
       "      <td>49352.000</td>\n",
       "      <td>49352.000</td>\n",
       "      <td>49352.000</td>\n",
       "      <td>49352.000</td>\n",
       "      <td>49352.000</td>\n",
       "      <td>49352.000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>1.212</td>\n",
       "      <td>1.542</td>\n",
       "      <td>40.742</td>\n",
       "      <td>-73.956</td>\n",
       "      <td>3830.174</td>\n",
       "      <td>1697.863</td>\n",
       "      <td>1657.567</td>\n",
       "      <td>-0.329</td>\n",
       "      <td>2.754</td>\n",
       "      <td>2016.000</td>\n",
       "      <td>...</td>\n",
       "      <td>0.003</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.186</td>\n",
       "      <td>0.009</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.028</td>\n",
       "      <td>0.002</td>\n",
       "      <td>0.001</td>\n",
       "      <td>0.001</td>\n",
       "      <td>1.617</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>0.501</td>\n",
       "      <td>1.115</td>\n",
       "      <td>0.639</td>\n",
       "      <td>1.178</td>\n",
       "      <td>22066.866</td>\n",
       "      <td>11004.769</td>\n",
       "      <td>7817.996</td>\n",
       "      <td>0.948</td>\n",
       "      <td>1.446</td>\n",
       "      <td>0.000</td>\n",
       "      <td>...</td>\n",
       "      <td>0.055</td>\n",
       "      <td>0.020</td>\n",
       "      <td>0.389</td>\n",
       "      <td>0.102</td>\n",
       "      <td>0.021</td>\n",
       "      <td>0.165</td>\n",
       "      <td>0.045</td>\n",
       "      <td>0.032</td>\n",
       "      <td>0.031</td>\n",
       "      <td>0.626</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>-118.271</td>\n",
       "      <td>43.000</td>\n",
       "      <td>21.500</td>\n",
       "      <td>43.000</td>\n",
       "      <td>-5.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>2016.000</td>\n",
       "      <td>...</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>1.000</td>\n",
       "      <td>1.000</td>\n",
       "      <td>40.728</td>\n",
       "      <td>-73.992</td>\n",
       "      <td>2500.000</td>\n",
       "      <td>1225.000</td>\n",
       "      <td>1066.667</td>\n",
       "      <td>-1.000</td>\n",
       "      <td>2.000</td>\n",
       "      <td>2016.000</td>\n",
       "      <td>...</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>1.000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>1.000</td>\n",
       "      <td>1.000</td>\n",
       "      <td>40.752</td>\n",
       "      <td>-73.978</td>\n",
       "      <td>3150.000</td>\n",
       "      <td>1500.000</td>\n",
       "      <td>1383.417</td>\n",
       "      <td>0.000</td>\n",
       "      <td>2.000</td>\n",
       "      <td>2016.000</td>\n",
       "      <td>...</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>2.000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>1.000</td>\n",
       "      <td>2.000</td>\n",
       "      <td>40.774</td>\n",
       "      <td>-73.955</td>\n",
       "      <td>4100.000</td>\n",
       "      <td>1850.000</td>\n",
       "      <td>1962.500</td>\n",
       "      <td>0.000</td>\n",
       "      <td>4.000</td>\n",
       "      <td>2016.000</td>\n",
       "      <td>...</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>2.000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>10.000</td>\n",
       "      <td>8.000</td>\n",
       "      <td>44.883</td>\n",
       "      <td>0.000</td>\n",
       "      <td>4490000.000</td>\n",
       "      <td>2245000.000</td>\n",
       "      <td>1496666.667</td>\n",
       "      <td>8.000</td>\n",
       "      <td>13.500</td>\n",
       "      <td>2016.000</td>\n",
       "      <td>...</td>\n",
       "      <td>1.000</td>\n",
       "      <td>1.000</td>\n",
       "      <td>1.000</td>\n",
       "      <td>2.000</td>\n",
       "      <td>1.000</td>\n",
       "      <td>1.000</td>\n",
       "      <td>1.000</td>\n",
       "      <td>1.000</td>\n",
       "      <td>1.000</td>\n",
       "      <td>2.000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>8 rows × 225 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       bathrooms  bedrooms  latitude  longitude       price  price_bathrooms  \\\n",
       "count  49352.000 49352.000 49352.000  49352.000   49352.000        49352.000   \n",
       "mean       1.212     1.542    40.742    -73.956    3830.174         1697.863   \n",
       "std        0.501     1.115     0.639      1.178   22066.866        11004.769   \n",
       "min        0.000     0.000     0.000   -118.271      43.000           21.500   \n",
       "25%        1.000     1.000    40.728    -73.992    2500.000         1225.000   \n",
       "50%        1.000     1.000    40.752    -73.978    3150.000         1500.000   \n",
       "75%        1.000     2.000    40.774    -73.955    4100.000         1850.000   \n",
       "max       10.000     8.000    44.883      0.000 4490000.000      2245000.000   \n",
       "\n",
       "       price_bedrooms  room_diff  room_num      Year       ...        \\\n",
       "count       49352.000  49352.000 49352.000 49352.000       ...         \n",
       "mean         1657.567     -0.329     2.754  2016.000       ...         \n",
       "std          7817.996      0.948     1.446     0.000       ...         \n",
       "min            43.000     -5.000     0.000  2016.000       ...         \n",
       "25%          1066.667     -1.000     2.000  2016.000       ...         \n",
       "50%          1383.417      0.000     2.000  2016.000       ...         \n",
       "75%          1962.500      0.000     4.000  2016.000       ...         \n",
       "max       1496666.667      8.000    13.500  2016.000       ...         \n",
       "\n",
       "           walk     walls       war    washer     water  wheelchair      wifi  \\\n",
       "count 49352.000 49352.000 49352.000 49352.000 49352.000   49352.000 49352.000   \n",
       "mean      0.003     0.000     0.186     0.009     0.000       0.028     0.002   \n",
       "std       0.055     0.020     0.389     0.102     0.021       0.165     0.045   \n",
       "min       0.000     0.000     0.000     0.000     0.000       0.000     0.000   \n",
       "25%       0.000     0.000     0.000     0.000     0.000       0.000     0.000   \n",
       "50%       0.000     0.000     0.000     0.000     0.000       0.000     0.000   \n",
       "75%       0.000     0.000     0.000     0.000     0.000       0.000     0.000   \n",
       "max       1.000     1.000     1.000     2.000     1.000       1.000     1.000   \n",
       "\n",
       "        windows      work  interest_level  \n",
       "count 49352.000 49352.000       49352.000  \n",
       "mean      0.001     0.001           1.617  \n",
       "std       0.032     0.031           0.626  \n",
       "min       0.000     0.000           0.000  \n",
       "25%       0.000     0.000           1.000  \n",
       "50%       0.000     0.000           2.000  \n",
       "75%       0.000     0.000           2.000  \n",
       "max       1.000     1.000           2.000  \n",
       "\n",
       "[8 rows x 225 columns]"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "train.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0,0.5,'Number of occurrences')"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZUAAAELCAYAAAARNxsIAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAGx5JREFUeJzt3X2wHXWd5/H3h/AgPibIhcokYYKa\nGUUdo14hypSj6EDAHRMpUChHIkNtxAKF0rUEd5aMPMyM4ygrM8pupogkrkOIiBI1GDMMyII8JGB4\nCJHl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bF0n6FPBu\n249I2h/4a+C9tn8j6bPAp6iKAsDvbP8pgKRrgFNt3yfpMOBrwBHAOcBRtn8laaLtZySdA/TbPr1m\nrl8BLrR9g6SDgJW2XyfpKuADwNfLdz5g+2FJ/zq8PfC6F/jPK+L3UlQitnWr7UEASWuB6cANw9rM\nAg4BbqzmFGRvqvm7hlxejn8p8A7gW6UdwD7l80bgUknLgLHObvte4JCWc7+8vIHwcqqi9XWqCUYv\nH6V9RCNSVCK29XTL+hba/3siYJXtE7dzjt+Uzz2Ax2zPHN7A9qnlKuJ9wFpJ27SpYQ/g7bb/31bJ\nSTcBr5HUB8wFzh+l/Ri+OmJb6VOJqO9JYOj/6m8GDpf0GgBJL5b0R8MPKC9s+oWk40s7SXpTWX+1\n7VtsnwM8QvVOnNbvqONHVDNUU845s3yvge8AX6aalv3XI7WPaEqKSkR9C4GrJV1rexPwUeAySXdS\nFZnXbue4DwOnSLoDWAfMKfEvSrpL0t3A9cAdwLVUt6dqddQDnwT6Jd0p6R7g1JZ9lwN/yfO3vkZr\nH/GCZer7iIhoTK5UIiKiMemoj9hFSToZOGNY+Ebbp3Ujn4g6cvsrIiIak9tfERHRmBSViIhoTIpK\nREQ0JkUlIiIak6ISERGN+f+UQGoL+CmGNwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x10fd29f60>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Target 分布, 看看各类样本分布是否均衡\n",
    "sns.countplot(train.interest_level)\n",
    "pyplot.xlabel('interest_level')\n",
    "pyplot.ylabel('Number of occurrences')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "各类样本不均衡. 交叉验证对分类任务缺省的是采用 StratifiedKFold, 在每折采样时根据各类样本按比例采样."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "y_train = train['interest_level']\n",
    "train.drop(['interest_level'], axis=1, inplace=True)\n",
    "X_train = np.array(train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "test = pd.read_csv('RentListingInquries_FE_test.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>listing_id</th>\n",
       "      <th>bathrooms</th>\n",
       "      <th>bedrooms</th>\n",
       "      <th>latitude</th>\n",
       "      <th>longitude</th>\n",
       "      <th>price</th>\n",
       "      <th>price_bathrooms</th>\n",
       "      <th>price_bedrooms</th>\n",
       "      <th>room_diff</th>\n",
       "      <th>room_num</th>\n",
       "      <th>...</th>\n",
       "      <th>virtual</th>\n",
       "      <th>walk</th>\n",
       "      <th>walls</th>\n",
       "      <th>war</th>\n",
       "      <th>washer</th>\n",
       "      <th>water</th>\n",
       "      <th>wheelchair</th>\n",
       "      <th>wifi</th>\n",
       "      <th>windows</th>\n",
       "      <th>work</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>7142618</td>\n",
       "      <td>1.000</td>\n",
       "      <td>1</td>\n",
       "      <td>40.718</td>\n",
       "      <td>-73.987</td>\n",
       "      <td>2950</td>\n",
       "      <td>1475.000</td>\n",
       "      <td>1475.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>2.000</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>7210040</td>\n",
       "      <td>1.000</td>\n",
       "      <td>2</td>\n",
       "      <td>40.728</td>\n",
       "      <td>-74.000</td>\n",
       "      <td>2850</td>\n",
       "      <td>1425.000</td>\n",
       "      <td>950.000</td>\n",
       "      <td>-1.000</td>\n",
       "      <td>3.000</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>7103890</td>\n",
       "      <td>1.000</td>\n",
       "      <td>1</td>\n",
       "      <td>40.731</td>\n",
       "      <td>-73.989</td>\n",
       "      <td>3758</td>\n",
       "      <td>1879.000</td>\n",
       "      <td>1879.000</td>\n",
       "      <td>0.000</td>\n",
       "      <td>2.000</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>7143442</td>\n",
       "      <td>1.000</td>\n",
       "      <td>2</td>\n",
       "      <td>40.711</td>\n",
       "      <td>-73.957</td>\n",
       "      <td>3300</td>\n",
       "      <td>1650.000</td>\n",
       "      <td>1100.000</td>\n",
       "      <td>-1.000</td>\n",
       "      <td>3.000</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>6860601</td>\n",
       "      <td>2.000</td>\n",
       "      <td>2</td>\n",
       "      <td>40.765</td>\n",
       "      <td>-73.984</td>\n",
       "      <td>4900</td>\n",
       "      <td>1633.333</td>\n",
       "      <td>1633.333</td>\n",
       "      <td>0.000</td>\n",
       "      <td>4.000</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 225 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   listing_id  bathrooms  bedrooms  latitude  longitude  price  \\\n",
       "0     7142618      1.000         1    40.718    -73.987   2950   \n",
       "1     7210040      1.000         2    40.728    -74.000   2850   \n",
       "2     7103890      1.000         1    40.731    -73.989   3758   \n",
       "3     7143442      1.000         2    40.711    -73.957   3300   \n",
       "4     6860601      2.000         2    40.765    -73.984   4900   \n",
       "\n",
       "   price_bathrooms  price_bedrooms  room_diff  room_num  ...   virtual  walk  \\\n",
       "0         1475.000        1475.000      0.000     2.000  ...         0     0   \n",
       "1         1425.000         950.000     -1.000     3.000  ...         0     0   \n",
       "2         1879.000        1879.000      0.000     2.000  ...         0     0   \n",
       "3         1650.000        1100.000     -1.000     3.000  ...         0     0   \n",
       "4         1633.333        1633.333      0.000     4.000  ...         0     0   \n",
       "\n",
       "   walls  war  washer  water  wheelchair  wifi  windows  work  \n",
       "0      0    0       0      0           0     0        0     0  \n",
       "1      0    1       0      0           0     0        0     0  \n",
       "2      0    0       0      0           0     0        0     0  \n",
       "3      0    0       0      0           1     0        0     0  \n",
       "4      0    1       0      0           0     0        0     0  \n",
       "\n",
       "[5 rows x 225 columns]"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "test.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 74659 entries, 0 to 74658\n",
      "Columns: 225 entries, listing_id to work\n",
      "dtypes: float64(7), int64(218)\n",
      "memory usage: 128.2 MB\n"
     ]
    }
   ],
   "source": [
    "test.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "test_id = test['listing_id']\n",
    "test.drop(['listing_id'], axis=1, inplace=True)\n",
    "X_test = np.array(test)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 数据预处理"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# 数据标准化\n",
    "from sklearn.preprocessing import StandardScaler\n",
    "\n",
    "# 初始化特征的标准化器\n",
    "ss_X = StandardScaler()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# 分别对训练数据和测试数据的特征进行标准化处理\n",
    "X_train = ss_X.fit_transform(X_train)\n",
    "X_test = ss_X.transform(X_test)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 模型训练"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Users/qi/anaconda3/lib/python3.6/site-packages/sklearn/model_selection/_split.py:2026: FutureWarning: From version 0.21, test_size will always complement train_size unless both are specified.\n",
      "  FutureWarning)\n"
     ]
    }
   ],
   "source": [
    "# 训练样本5w, 交叉验证太慢, 用 train_test_split 估计模型性能\n",
    "from sklearn.model_selection import train_test_split\n",
    "X_train_part, X_val, y_train_part, y_val = train_test_split(X_train, y_train, train_size=0.8, random_state=0)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### default SVC"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "from sklearn import metrics"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "from sklearn.svm import LinearSVC\n",
    "SVC1 = LinearSVC().fit(X_train_part, y_train_part)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Classification report for classifier LinearSVC(C=1.0, class_weight=None, dual=True, fit_intercept=True,\n",
      "     intercept_scaling=1, loss='squared_hinge', max_iter=1000,\n",
      "     multi_class='ovr', penalty='l2', random_state=None, tol=0.0001,\n",
      "     verbose=0):\n",
      "             precision    recall  f1-score   support\n",
      "\n",
      "          0       0.18      0.01      0.02       753\n",
      "          1       0.43      0.11      0.17      2221\n",
      "          2       0.72      0.97      0.83      6897\n",
      "\n",
      "avg / total       0.61      0.70      0.62      9871\n",
      "\n",
      "\n",
      "Confusion matrix: \n",
      "[[   8  128  617]\n",
      " [  21  243 1957]\n",
      " [  16  198 6683]]\n"
     ]
    }
   ],
   "source": [
    "# 在校验集上测试, 估计模型性能\n",
    "y_predict = SVC1.predict(X_val)\n",
    "\n",
    "print('Classification report for classifier %s:\\n%s\\n' %(SVC1, metrics.classification_report(y_val, y_predict)))\n",
    "print('Confusion matrix: \\n%s' %metrics.confusion_matrix(y_val, y_predict))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "各项表现都不怎么样."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 线性 SVM 正则参数调优"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "线性 SVM LinearSVC 需要调优的正则超参数包括: C (正则系数, 一般在 log 域 (取 log 后的值), 均匀设置候选参数) 和 正则函数 penalty (L2/L1)  \n",
    "我们用校验集 (X_val, y_val) 来估计模型性能"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "def fit_grid_Linear(C, X_train, y_train, X_val, y_val):\n",
    "    # 在训练集上利用 SVC 训练\n",
    "    SVC2 = LinearSVC(C=C)\n",
    "    SVC2 = SVC2.fit(X_train, y_train)\n",
    "    \n",
    "    # 在验证集上返回 accuracy\n",
    "    accuracy = SVC2.score(X_val, y_val)\n",
    "    \n",
    "    print('accuracy: {}'.format(accuracy))\n",
    "    \n",
    "    return accuracy"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "accuracy: 0.7037787458210921\n",
      "accuracy: 0.7045892006888866\n",
      "accuracy: 0.7067166447168474\n",
      "accuracy: 0.7064127241414244\n",
      "accuracy: 0.7001316989160166\n",
      "accuracy: 0.6556579880457907\n",
      "accuracy: 0.5134231587478473\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZIAAAEKCAYAAAA4t9PUAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAIABJREFUeJzt3XuUFeWd7vHvA9ggKCOGVhFRiEEN\nxojHFqNGB2M0OEbAG7J7zomXSZw446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96urEngeGShkmqAyYCM3OuqVtLL1Bf\nCyyOiH/Pu55ySKpvviNT0rbAl8nw95bv2iqBpNuAvUnuEnoJ+GZEvJJvVR0jaRnQG3gzbZpbjXeg\nSToB+A+gHngHmB8RX8m3qq0j6W+AnwI9gesi4sqcS+oQSbcAo0lGmv0TcElEXJtrUR0g6YvAI8AC\nkr/rAN+NiHvyq6pjJH0euJ7kz1YPYGpEXJbZ9zlIzMysHO7aMjOzsjhIzMysLA4SMzMri4PEzMzK\n4iAxM7OyOEjMOoGk99tfq83tp0n6dPp6O0m/lPR8OnLrw5IOllSXvvaDxFZRHCRmOZO0L9AzIpan\nTZNIBkEcHhH7AqcDA9PBHR8ATs2lULMtcJCYdSIlfpSOCbZA0qlpew9Jv0jPMO6SdI+kk9PN/haY\nka63J3Aw8P2I2ASQjhB8d7ru9HR9s4rhU2SzznUiMBLYn+RJ7yclPQwcBgwF9gN2Ihmi/Lp0m8OA\nW9LX+5I8pb9xC/t/Fjgok8rNOshnJGad64vALenIq38Cfkfyi/+LwK0RsSkiXgPmFG0zCFhdys7T\ngFmXTrxkVhEcJGadq7Xh4dtqB1gD9ElfLwT2l9TW383ewEcdqM0sEw4Ss871MHBqOqlQPXAE8ATJ\nVKcnpddKdiYZ5LDZYuAzABHxPNAE/CAdjRZJw5vnYJH0KWB1RKzvqgMya4+DxKxz3QE8AzwNPAh8\nJ+3Kuo1kDpJnSeaZfxz4c7rN3WweLF8HdgGWSVoA/IqP5yo5Eqi60Wittnn0X7MuImm7iHg/Pat4\nAjgsIl5L54uYk77f0kX25n3cDlxc5fPVW43xXVtmXeeudLKhOuDy9EyFiFgj6RKSOdtf3tLG6QRY\n0x0iVml8RmJmZmXxNRIzMyuLg8TMzMriIDEzs7I4SMzMrCwOEjMzK4uDxMzMyvL/AcMbt8o6c2fc\nAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1a1d8b9128>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 需要调优的参数\n",
    "C_s = np.logspace(-3, 3, 7)\n",
    "\n",
    "accuracy_s = []\n",
    "for i, oneC in enumerate(C_s):\n",
    "    tmp = fit_grid_Linear(oneC, X_train, y_train, X_val, y_val)\n",
    "    accuracy_s.append(tmp)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZIAAAEKCAYAAAA4t9PUAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAIABJREFUeJzt3XuUFeWd7vHvA9ggKCOGVhFRiEEN\nxojHFqNGB2M0OEbAG7J7zomXSZw446grTqImmaPxsiazkoxJZsycGDRRowKiAt4GUTEaR9QmoghI\nQLyAaMRbvCHX3/mjquOmbbo3vbu69t79fNaq1Xu/u6r2rxT6od6qel9FBGZmZh3VI+8CzMysujlI\nzMysLA4SMzMri4PEzMzK4iAxM7OyOEjMzKwsDhIzMyuLg8TMzMriIDEzs7L0yruArjBw4MAYOnRo\n3mWYmVWVefPmvRER9e2t1y2CZOjQoTQ1NeVdhplZVZH0UinruWvLzMzK4iAxM7OyOEjMzKwsDhIz\nMyuLg8TMzMriIDEzs7I4SMzMrCzd4jkSq2wRsGYNfPBBacuaNcl2EvTokSzNr9tq6+rPSlm/b1/Y\nfXfYbrt8/x+YlcNBYiXZuLH0X/SlLh9++PHPiLyPMF8DB8KwYTB0aLI0vx42DPbYA7bdNucCzdrg\nIKlQEbBhw+bL+vXltW3Nv/pbLmvXbl39vXpBv36fXHbYAQYPbv2zUpc+fZJ/zUcky6ZNydL8uuXP\nUtvy2Nf778OLL368zJ8PM2bAunWb//fceefNw6X45+67Q+/enfGnzqxjHCRt+O1vYcmSzv+FXkrb\nx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XTrxkVhEcJGadq7Xh4dtqB1gD9ElfLwT2l9TW383ewEcdqM0sEw4Ss871MHBqOqlQPXAE8ATJ\nVKcnpddKdiYZ5LDZYuAzABHxPNAE/CAdjRZJw5vnYJH0KWB1RKzvqgMya4+DxKxz3QE8AzwNPAh8\nJ+3Kuo1kDpJnSeaZfxz4c7rN3WweLF8HdgGWSVoA/IqP5yo5Eqi60Wittnn0X7MuImm7iHg/Pat4\nAjgsIl5L54uYk77f0kX25n3cDlxc5fPVW43xXVtmXeeudLKhOuDy9EyFiFgj6RKSOdtf3tLG6QRY\n0x0iVml8RmJmZmXxNRIzMyuLg8TMzMriIDEzs7I4SMzMrCwOEjMzK4uDxMzMyvL/AcMbt8o6c2fc\nAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1a2ec01128>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "x_axis = np.log10(C_s)\n",
    "pyplot.plot(x_axis, np.array(accuracy_s), 'b-')\n",
    "pyplot.legend()\n",
    "pyplot.xlabel('log(C)')\n",
    "pyplot.ylabel('accuracy')\n",
    "pyplot.savefig('svm_RentalListingInquries.png')\n",
    "pyplot.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "在 C=0.1 处, 准确度最高为 0.7067."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### RBF  核 SVM 正则参数调优"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "RBF 核 SVM 需要调优的正则超参数包括: C (正则系数, 一般在 log 域 (取 log 后的值), 均匀设置候选参数）和 核函数的宽度 gamma  \n",
    "C 越小, 决策边界越平滑; gamma 越小, 决策边界越平滑."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "我们用校验集 (X_val, y_val) 来估计模型性能."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "from sklearn.svm import SVC"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "def fit_grid_point_RBF(C, gamma, X_train, y_train, X_val, y_val):\n",
    "    # 在训练集上利用 SVC 训练\n",
    "    SVC3 = SVC(C=C, kernel='rbf', gamma=gamma, cache_size=2048)\n",
    "    SVC3 = SVC3.fit(X_train, y_train)\n",
    "    \n",
    "    # 在校验集上返回 accuracy\n",
    "    accuracy = SVC3.score(X_val, y_val)\n",
    "    \n",
    "    print('accuracy: {}'.format(accuracy))\n",
    "    \n",
    "    return accuracy"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "accuracy: 0.6987134028973762\n",
      "accuracy: 0.6991186303312734\n",
      "accuracy: 0.6992199371897477\n",
      "accuracy: 0.6999290851990679\n",
      "accuracy: 0.6991186303312734\n",
      "accuracy: 0.7016513017931314\n",
      "accuracy: 0.7077297133015905\n",
      "accuracy: 0.7196839226015601\n",
      "accuracy: 0.7012460743592341\n",
      "accuracy: 0.7051970418397325\n",
      "accuracy: 0.7138081248100496\n",
      "accuracy: 0.7741870124607436\n",
      "accuracy: 0.7038800526795664\n",
      "accuracy: 0.7093506230371797\n",
      "accuracy: 0.7222165940634181\n",
      "accuracy: 0.8526998277783406\n"
     ]
    }
   ],
   "source": [
    "# 需要调优的参数\n",
    "C_s = np.logspace(-1, 2, 4)\n",
    "gamma_s = np.logspace(-5, -2, 4)\n",
    "\n",
    "accuracy_s = []\n",
    "for i, oneC in enumerate(C_s):\n",
    "    for j, gamma in enumerate(gamma_s):\n",
    "        tmp = fit_grid_point_RBF(oneC, gamma, X_train, y_train, X_val, y_val)\n",
    "        accuracy_s.append(tmp)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "image/png": "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li1b0r17\nd0RCnW83pnqqyvbt28nMzKRHjx6RDseYiIjqch8FBQWkpKRYojAHRERISUmxPVTTpEV1sgAsUZg6\nYX9HpqmL+mRhjDHRbO8HH7D7rbdcfx9LFi7avn076enppKen07FjR7p06VI2XVRUFPbrPPPMM2zd\nurXG75+WlsauXbtqvF6pyZMn88UXX9R6/fpw8skns3v37pDLPvjgA1q3bl32md91110h261fv55B\ngwbRs2dPRo8eTXFxsZshG1Nn9rz/PplXT2Xn4pdRr7sVkSxZuCglJYXVq1ezevVqJk6cyNSpU8um\n4+Pjw36d2iaLA5Gdnc2qVas49thj6/V9a2r06NE88cQTlS4/8cQTyz7zGTNmhGxz/fXXc8MNN7Bu\n3TqSkpJ49tlnXYrWmLqzZ+kyNk29hmZ9+9L1qQWIx+Pq+1myiJBFixYxaNAg0tPTmTRpEj6fj5KS\nEi666CIOP/xwDjvsMB5++GFefvllVq9ezQUXXFDjPZJAc+fO5bDDDuOwww7jkUceKZs/c+ZMDj30\nUE499VQuuOACHnzwQQD+9re/8cc//rGs3ZIlSzjkkEMYMmQIU6ZM4ZxzzgHgq6++4phjjmHAgAEM\nHjyYX3/9FYCFCxfypz/9iTPPPJMePXowf/585s2bx4ABAzj22GPL9niOO+44rrnmGoYMGUKfPn1Y\nuXIl5557Lr169eK2224re/+zzjqLI488kr59+7Jw4cKy+cOHD+fFF1+s1WcC4PV6+fTTTzn33HMB\nGDNmDG+++WatX8+Y+rDnvaVsuuYamh12GF2fXoinRQvX3zOqL50NdPvf17B28546fc0+nVsx86y+\nNV7vhx9+4I033uCLL74gNjaWCRMmsHjxYg4++GBycnL4/vvvAdi1axfJyck88sgjPProo6Snp9cq\nzuXLl/PCCy+wfPlyvF4vgwYN4oQTTiA/P5+3336bb7/9lsLCQtLT0znmmGMA+Ne//sVf/vIXAPLz\n85k0aRL/+te/6NatG+eff37Za/fu3ZvPP/8cj8fDe++9x80338zLL78MwJo1a/jmm2/Izc2lV69e\n3H///axatYopU6bw//7f/2Py5MkANGvWjM8++4z77ruPc845h6+//prWrVvzhz/8gauvvprk5GQW\nLVpE27Ztyc/PJyMjg/POO482bdrQrl079u7dW/ZZBfv888/p378/Xbp04d5776VPnz7llmdnZ9Ou\nXTs8/m9laWlpbNq0qVafszH1Yc9777Hp2uto1r8/XRcswNOieb28b5NJFg3JBx98wIoVK8jIcO6D\n2bdvH127duX000/n559/5qqrrmLYsGGcdtppdfJ+n332Geeddx5JSUkAnHPOOXz++efk5+dzzjnn\nkJCQQEJCAmeeeWbZOlu2bKG03tbatWs55JBDOOiggwAYNWoUzz33HOAktIsvvpj169dXeN+TTjqJ\n5s2b07x5c1q0aMFZZ50FwOGHH84vv/xS1u7ss88um3/44YfToUMHALp3705mZibJyck88MADLFni\nVIvJzMxk/fr1ZZ9f+/bt2bJlS4VkMXDgQH7//XdatGjB3//+d/70pz/x008/lWsT6qZUu/LJNFR7\n3n2XTdffQLP0dLo++WS9JQpoQsmiNnsAblFVxo0bxx133FFh2Xfffcc//vEPHn74YV577TUWLFhQ\n6ev8/vvvZYeDJk+ezCWXXFLp+9VkPjjf9kvvK6iq3YwZMzj99NOZNGkS69atY+jQoWXLEhISyp7H\nxMSUTcfExFBSUlKhXWCbwHYffPABn376KV999RXNmjXjuOOOK3fPQ0FBAc2aNePhhx/mmWeeAWDZ\nsmWkpqaWtTnrrLO4/PLLK+yBpKamkpOTg9frxePxkJmZSefOnSvdXmMiZfc777D5hmk0G5BOtyef\nJKZ5/SUKsHMWEXHKKafwyiuvkJOTAzhXTW3YsIHs7GxUlT//+c/cfvvtfPPNNwC0bNmSvXv3Vnid\n7t27l528rSxRABx//PG88cYb7Nu3j9zcXN566y2GDBnCcccdx5IlSygsLGTv3r28++67Zev07t2b\ndevWAdC3b19+/vlnNm7ciKqWHWYC2L17N126dAFw7cTw7t27adu2Lc2aNWPNmjWsWLGibJnP5yMn\nJ4euXbty5ZVXln0eqamp5S4K+Oqrr4iNja2w9+HxeBgyZAhvvPEG4JxLGj48eIwuYyJr99/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ib.figure.Figure at 0x1a1da547f0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "accuracy_s1 = np.array(accuracy_s).reshape(len(C_s), len(gamma_s))\n",
    "x_axis = np.log10(C_s)\n",
    "for j, gamma in enumerate(gamma_s):\n",
    "    pyplot.plot(x_axis, np.array(accuracy_s1[:,j]), label='Test - log(gamma)'+str(np.log10(gamma)))\n",
    "    \n",
    "pyplot.legend()\n",
    "pyplot.xlabel('log(C)')\n",
    "pyplot.ylabel('accuracy')\n",
    "pyplot.savefig('RBF_SVM_RentListingInquries')\n",
    "\n",
    "pyplot.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "可以看到正确率极值点在参数范围边缘取得, 但 C 和 gamma 都不宜取太大."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "## 模型预测"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "C 不宜取太大, 取 100, gamma 取0.01"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "from sklearn.svm import SVC"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "collapsed": true,
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "SVC_final = SVC(C=100, kernel='rbf', gamma=0.01, cache_size=2048)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "SVC(C=100, cache_size=2048, class_weight=None, coef0=0.0,\n",
       "  decision_function_shape='ovr', degree=3, gamma=0.01, kernel='rbf',\n",
       "  max_iter=-1, probability=False, random_state=None, shrinking=True,\n",
       "  tol=0.001, verbose=False)"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "SVC_final.fit(X_train, y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "y_predict = SVC_final.predict(X_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0,0.5,'Number of occurrences')"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZUAAAELCAYAAAARNxsIAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAGc1JREFUeJzt3X/0XVV55/H3BxDFHxiokaEEGtS0\nlfoDNcUos/yFxYAzQF3F6jglUtakulBx2XbEjgMj6LSOVSttZZpVosSxAlKVtKIxpaAjRSTILwEd\nIrWQgUI0iKgjLvSZP+7+yk1y881Jcm4uN3m/1rrrnvPcfc59Lt+V9XDO3mfvVBWSJPVhj0knIEna\ndVhUJEm9sahIknpjUZEk9caiIknqjUVFktQbi4okqTcWFUlSbywqkqTe7DXpBHa2Jz3pSTV//vxJ\npyFJU+Paa6/9TlXN7dJ2tysq8+fPZ82aNZNOQ5KmRpJ/6drW21+SpN5YVCRJvbGoSJJ6Y1GRJPXG\noiJJ6s1Yi0qSOUkuTvKNJLcmeUGS/ZOsTnJbe9+vtU2Sc5KsTXJjkucOnWdJa39bkiVD8ecluakd\nc06SjPP3SJJmN+4rlQ8Bn6+qXwWeDdwKnA5cVlULgMvaPsAxwIL2WgqcC5Bkf+BM4PnAEcCZM4Wo\ntVk6dNziMf8eSdIsxlZUkuwLvAg4D6CqflJV3wOOB85vzc4HTmjbxwMrauArwJwkBwKvAFZX1Yaq\nug9YDSxun+1bVVfVYE3kFUPnkiRNwDivVJ4CrAc+kuS6JH+d5HHAAVV1N0B7f3Jrf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7cC21RU2rIE2+JwYLd+eE7TzaIiAUl+0N5fkuSKJBcn+UaSj2fgLcAvApcn\nuby1PTrJVUm+luSTbVJBknw7yRlJvgycmOSpST6f5Nok/zvJr7Z2Jyb5epIbknypTbFzFvDb7cns\n3+6Q99wkf5vkmvY6MskeLYc5Q+3WJjlgVPve/2Nqt7bXpBOQHoGeA/wag0k5rwSOrKpzkrwNeGlV\nfSfJk4B3Ai+vqh8meTvwNgZFAeDHVfVvAZJcBryhqm5L8nzgw8DLgDOAV1TV/00yp6p+kuQMYGFV\nvaljrh8CPlhVX05yCLCqqp6e5BLgN4GPtO/8dlXdk+RvNm0PPH0H/3tJP2dRkTb31apaB5DkemA+\n8OVN2iwCDgOuHMwpyN4M5u+acWE7/vHAC4FPtnYAj27vVwIfTXIRsL2z274cOGzo3Pu2FQgvZFC0\nPsJggtELt9Je6oVFRdrcg0PbP2X0v5MAq6vqtVs4xw/b+x7A96rq8E0bVNUb2lXEK4Hrk2zWpoM9\ngBdU1f/bKLnkKuBpSeYCJwDv3kr77fhqaXP2qUjdPQDM/F/9V4AjkzwNIMljk/zypge0BZv+OcmJ\nrV2SPLttP7Wqrq6qM4DvMFgTZ/g7uvgCgxmqaec8vH1vAZ8GPsBgWvbvztZe6otFRepuGfC5JJdX\n1Xrg9cAnktzIoMj86haOex1wSpIbgJuB41v8fUluSvJ14EvADcDlDG5PdeqoB94CLExyY5JbgDcM\nfXYh8B95+NbX1tpLO8yp7yVJvfFKRZLUGzvqpUeoJCcDp20SvrKqTp1EPlIX3v6SJPXG21+SpN5Y\nVCRJvbGoSJJ6Y1GRJPXGoiJJ6s3/B3vHjuhiHfj1AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1178fafd0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.countplot(y_predict)\n",
    "pyplot.xlabel('interest_level')\n",
    "pyplot.ylabel('Number of occurrences')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "直观上, 预测结果中 0 类(high)和 1 类(medium)比例相对训练数据集有点少."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "result = pd.DataFrame({'listing_id':test_id, 'interest_level_predict':y_predict})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "result.to_csv('SVMresults_RentalListingInquiries.csv',index=False)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
